import { router } from '@ruifox-cms/utils'

const routes = [
  {
    path: '/exam/home',
    name: 'Layout',
    // redirect: '/exam/course/commentFormList',
    component: () => import('@/views/layout/UserLayout.vue'),
    meta: {
      title: '考试',
      whiteList: true
    },
    children: [
      {
        path: '/exam/user/home',
        name: 'home',
        component: () => import('@/views/exam/user/Home.vue'),
        meta: {
          title: '首页',
          whiteList: true
        },
      },
      {
        path: '/exam/user/qaedaIntro',
        name: 'qaedaIntro',
        component: () => import('@/views/exam/user/QaedaIntro.vue'),
        meta: {
          title: '招生',
          whiteList: true
        },
      },
      {
        path: '/exam/user/notice',
        name: 'notice',
        component: () => import('@/views/exam/user/Notice.vue'),
        meta: {
          title: '公告',
          whiteList: true
        },
      },
      {
        path: '/exam/user/course/courseList',
        name: 'courseList',
        component: () => import('@/views/exam/user/course/CourseList.vue'),
        meta: {
          title: '课程中心',
          whiteList: true
        },
      },
      {
        path: '/exam/user/course/courseDetail',
        name: 'courseDetail',
        component: () => import('@/views/exam/user/course/CourseDetail.vue'),
        meta: {
          title: '课程详情',
          whiteList: true
        },
      },
      {
        path: '/exam/user/course/courseLearn',
        name: 'courseLearn',
        component: () => import('@/views/exam/user/course/CourseLearn.vue'),
        meta: {
          title: '课程学习',
          whiteList: true
        },
      },
      {
        path: '/exam/user/examList',
        name: 'examList',
        component: () => import('@/views/exam/user/exam/ExamList.vue'),
        meta: {
          title: '考试中心',
          whiteList: true
        },
      },
      {
        path: '/exam/user/examDetail',
        name: 'examList',
        component: () => import('@/views/exam/user/exam/ExamDetail.vue'),
        meta: {
          title: '考试详情',
          whiteList: true
        },
      },
      // {
      //   path: '/exam/user/exercise',
      //   name: 'exercise',
      //   component: () => import('@/views/exam/user/Exercise.vue'),
      //   meta: {
      //     title: '题库练习',
      //     whiteList: true
      //   },
      // },
      {
        path: '/exam/user/wrongQuestion',
        name: 'wrongQuestion',
        component: () => import('@/views/exam/user/WrongQuestion.vue'),
        meta: {
          title: '错题集',
          whiteList: true
        },
      },
      {
        path: '/exam/user/notes',
        name: 'notes',
        component: () => import('@/views/exam/user/note/Notes.vue'),
        meta: {
          title: '笔记管理',
          whiteList: true
        },
      },
      {
        path: '/exam/user/noteDetail',
        name: 'noteDetail',
        component: () => import('@/views/exam/user/note/NoteDetail.vue'),
        meta: {
          title: '笔记详情',
          whiteList: true
        },
      },
      {
        path: '/exam/user/certificate',
        name: 'certificate',
        component: () => import('@/views/exam/user/Certificate.vue'),
        meta: {
          title: '证书管理',
          whiteList: true
        },
      },
      {
        path: '/exam/user/userCenter',
        name: 'userCenter',
        component: () => import('@/views/exam/user/center/UserCenter.vue'),
        meta: {
          title: '个人中心',
          whiteList: true
        },
      },
      {
        path: '/exam/user/consultation',
        name: 'consultation',
        component: () => import('@/views/exam/user/Consultation.vue'),
        meta: {
          title: '咨询反馈',
          whiteList: true
        },
      },
      {
        path: '/exam/user/commonProblem',
        name: 'commonProblem',
        component: () => import('@/views/exam/user/CommonProblem.vue'),
        meta: {
          title: '常见问题',
          whiteList: true
        },
      },
    ]
  },
  {
    path: '/exam/certificateVerification',
    name: 'certificateVerification',
    component: () => import('@/views/exam/CertificateVerification.vue'),
    meta: {
      title: '证书查验',
      whiteList: true
    },
  },
]

routes.forEach(route => {
  router.addRoute(route)
})

export default router